package com.ghpt.service.impl;
import com.ghpt.mapper.DiYuanMapper;
import com.ghpt.pojo.DiYuan;
import com.ghpt.service.DiYuanService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class DiYuanServiceImpl implements DiYuanService {
    @Autowired
    private DiYuanMapper diYuanMapper;

    @Override
    public DiYuan findDiYuanById(Long id) {
        if (id != null) {
            return diYuanMapper.selectById(id);
        }else {
            return null;
        }
    }
    @Override
    public int updateById(DiYuan diYuan) {
        return diYuanMapper.updateById(diYuan);//更新成功为1否则为0
    }
}
